Nightmare Website 4 Learn Cyber Security

Cyber Security Web Application Attacks


Web applications are everywhere today, and they are used to control just about everything you can imagine. In this section we will look into web application attacks and security.

IDOR ("Insecure Direct Object Reference")

IDOR vulnerabilities happen when developers have not implemented authorization requirements to access resources.

Eve, by simply changing an identifier, e.g. the document Rest parameter, she can access Alice's documents.

This happens when the web application does not enforce authorization between objects, allowing attackers to enumerate values and test access to other points of data.

For example we might have the following pseudo-code showing no signs of authorization:

The code above asks for input from user, performs no validation or sanitization, then performs a lookup with the getDocument function directly and returns the document in question.

A better implementation would be to check the privileges:

Vulnerabilities like these are easy to find as you can simply change a simple number and see if you get access to someone else's data. Checking if the user is authorized first prevents this vulnerability.